@model OrchardCore.ContentFields.ViewModels.EditNumericFieldViewModel

@{
    var settings = Model.PartFieldDefinition.GetSettings<NumericFieldSettings>();
    string name = Model.PartFieldDefinition.DisplayName();
    decimal step = (decimal)Math.Pow(10, 0 - settings.Scale);
    decimal from = settings.Minimum.HasValue ? settings.Minimum.Value : 0;
    decimal to = settings.Maximum.HasValue ? settings.Maximum.Value : 10;
}

<fieldset class="form-group">
    <div class="row col-sm-3">
        <label asp-for="Value">@name</label>
        <select asp-for="Value" class="form-control content-preview-select">
            @if (!settings.Required)
            {
                <option value="">@T["None"]</option>
            }
            @for (decimal d = from; d <= to; d += step)
            {
                <option value="@d">@d</option>
            }
        </select>
        <span class="hint">@settings.Hint</span>
    </div>
</fieldset>
